﻿
Public Class user
    Inherits catView

    Public Shadows Const _pathidentity As String = "/usr"

    Public Overrides Function pathidentity() As String
        Return _pathidentity
    End Function

    Public Shared Shadows Function baseurl() As String
        Return strmid(_pathidentity, strlen(network.pathSeperator))
    End Function

    Public Shared Function generateUserViewlink(ByVal context As httpContext, ByVal usr As String, _
                                                Optional ByVal ignoreText As Boolean = True) As String
        assert(Not context Is Nothing, "context is nothing.")

        Dim rtn As String = Nothing
        rtn = generateLink(context, baseurl(), query.category, ignoreText)
        rtn = urlUtils.appendQuery(rtn, query.category, usr)

        Return rtn
    End Function

    Public Shared Function generateUserViewlink(ByVal usr As String, _
                                                Optional ByVal ignoreText As Boolean = True) As String
        Return generateUserViewlink(httpServer2.currentContext(), usr, ignoreText)
    End Function
End Class
